/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-03-28
 * Time: 11:40
 */


public class Test {
    public static void main(String[] args) {
        myLinkedList list = new myLinkedList();
        list.addLast(2);
        list.addLast(2);
        list.addLast(2);
        list.addLast(2);
        list.addLast(1);
        list.addLast(1);
        list.addLast(3);
        list.addLast(3);
        list.addLast(3);
        list.addLast(2);
        list.addLast(1);
        list.addLast(1);
        list.addLast(1);
        list.display();
        list.removeAllKey(3);
        list.display();
    }

    public static void main1(String[] args) {
        myLinkedList list = new myLinkedList();
/*        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(2);
        list.addFirst(2);
        list.addFirst(2);
        list.addFirst(6);
        list.addFirst(7);*/
        list.addFirst(7);
/*        list.addFirst(2);
        list.addFirst(7);
        list.addFirst(3);
        list.addFirst(2);
        list.addFirst(2);
        list.addFirst(2);
        list.addFirst(2);
        list.addFirst(1);
        list.addFirst(12);*/
        list.display();
        list.remove(7);
//        list.removeAllKey(2);
        list.display();
    }

    public static void main2(String[] args) {
        myLinkedList list = new myLinkedList();
//        list.addFirst(1);
//        list.addFirst(2);
//        list.addFirst(3);
//        list.display();
//        list.addLast(99);
//        list.addLast(99);
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.display();
        list.addIndex(1, 99);
        list.display();
        System.out.println(list.contains(3));
    }
}
